In a standard memory, a memory address is input, and the contents stored at that address are output. In a content addressable memory (CAM), the input is the desired content. The output is an indication of each memory address that contains the desired content. Content addressable memory is useful in many different applications, such as translation lookaside buffers, for example.
The CAM may include a plurality of dictionary entries whose content can be referred to as dictionary words. The content addressable memory may receive an input word, which contains the content that is desired to be found in the CAM. The CAM may then search the dictionary words to find all entries that contain the input word. An indication of all matching dictionary entries may then be returned.
In a CAM, all memory cells that comprise dictionary entry may be connected to a match line for that dictionary entry. The match line may be initially pre-charged. Each memory cell is then compared to its corresponding bit position in the input word. If a bit cell does not match, it causes the match line to discharge. As should be clear, if any bit cell does not match, the match line will be discharged. At the end of this operation, if the match line for the dictionary entry is still charged, the dictionary word contained in the dictionary entry matches the input word, otherwise, it does not. In general, all dictionary entries are compared to the input word in parallel.